@inject('appRepository', 'App\Repositories\AppRepository')
@php
    $banner =  $appRepository->getPictureByColumn(5,['公证指南','公证指南轮播']);
    $about = $appRepository->getContentByColumn(5,['公证指南']);

@endphp
@extends('layouts.app')
@section('title','公证指南')
@section('content')
    <div id="myCarousel" class="carousel slide" data-ride="carousel">
        <div class="carousel-inner">
            @foreach($banner as $key => $item)
                <div class="carousel-item {{$key == 0 ? 'active':""}}">
                    <img class="bd-placeholder-img" width="100%" height="100%"
                         src="{{$item->content_detail->asset?$item->content_detail->asset->path:''}}"
                         preserveAspectRatio="xMidYMid slice" focusable="false"/>

                </div>
            @endforeach
        </div>
    </div>
    <div class="container-fluid py-5 bg-grey">
        <div class="container">
            @foreach($about as $item)
                <div class="guide-box my-5">
                    <img src="{{$item->content_detail->asset?$item->content_detail->asset->path:''}}"
                         class="w-100 img-fluid" alt="">
                    <p class="guide-sub-title"><i class="square"></i>{{$item->content_detail->sub_title}}</p>
                    <div class="guide-box-bottom">
                        <a href="{{url('/content/'.$item->id)}}">
                        <p class="guide-title">{{$item->content_detail->title}}</p>
                        </a>
                        <div class="guide-desc">{!! $item->content_detail->content !!}</div>
                    </div>
                </div>
            @endforeach
        </div>
    </div>
@endsection
@push('scripts')
@endpush
